package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;
import com.aiyige.page.my.message.util.MessageUtil;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by usera on 2017/11/27.
 */

public class QueryTypeNoticesRequest {
    Integer type;
    Integer pageNum;
    Integer pageSize;

    private QueryTypeNoticesRequest(Builder builder) {
        setType(builder.type);
        setPageNum(builder.pageNum);
        setPageSize(builder.pageSize);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public static final class Builder {
        private Integer type;
        private Integer pageNum;
        private Integer pageSize;

        private Builder() {
            type = null;
            pageNum = 1;
            pageSize = 15;
        }

        public Builder system() {
            this.type = 0;
            return this;
        }

        public Builder like() {
            this.type = 1;
            return this;
        }

        public Builder collection() {
            this.type = 2;
            return this;
        }

        public Builder comment() {
            this.type = 3;
            return this;
        }

        public Builder order() {
            this.type = 4;
            return this;
        }

        public Builder pageNum(Integer pageNum) {
            this.pageNum = pageNum;
            return this;
        }

        public Builder pageSize(Integer pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Call<ResponseBody> build() {
            return ApiManager.getService().queryTypeNotices(new QueryTypeNoticesRequest(this));
        }
    }
}
